import { defineStore } from 'pinia'
import { getSeatInfo, getSeatreservationInfo } from '../api/seat'
import { ref } from 'vue'
export const useSeatStore = defineStore('seat', () => {
  const seatInfo = ref([])
  const reservationInfo = ref([])

  const getSeatInfoFn = async () => {
    const res = await getSeatInfo()
    seatInfo.value = res.data
  }
  const getSeatreservationInfoFn = async () => {
    const res = await getSeatreservationInfo()
    reservationInfo.value = res.data
  }
  return {
    seatInfo,
    reservationInfo,
    getSeatInfoFn,
    getSeatreservationInfoFn
  }
})
